<?php
/* @var $this XController */
$this->pageTitle = '帐号列表';
?>
<table class="list">
  <thead>
    <tr>
      <th width="35"><input type="checkbox" title="全选" /></th>
      <th width="150">用户名</th>
      <th width="150">真实姓名</th>
      <th width="150">角色</th>
      <th width="250"><a class="del-all" href="<?php echo $this->createUrl('del');?>">删除</a></th>
      <th>&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($model->getData() as $item):?>
    <tr>
      <td align="center"><input type="checkbox" value="<?php echo $item->id;?>" /></td>
      <td><?php echo $item->username;?></td>
      <td><?php echo $item->realname;?></td>
      <td><a href="<?php echo $this->createUrl('role/update', array('id' => $item->admin_role_id));?>"><?php echo $item->role->honor;?></a></td>
      <td align="center">
        <a class="blank" href="<?php echo $this->createUrl('update', array('id' => $item->id));?>" target="_blank">修改</a> | 
        <a class="del-single" href="<?php echo $this->createUrl('delete', array('id' => $item->id));?>">删除</a> |
        <a class="blank" href="<?php echo $this->createUrl('password', array('id' => $item->id));?>" target="_blank">更新密码</a>
      </td>
      <td></td>
    </tr>
    <?php endforeach;?>
  </tbody>
</table>
<?php $this->renderPartial('/share/pager', array('pager' => $model->getPagination()));?>